import http from './request'

// 轮播图接口
export const swiperdataApi = () => {
    return http({
        method: 'GET',
        url: 'https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata',
        params: {}
    });
}

// 商品分类
export const categoriesApi = () => {
    return http({
        method: 'GET',
        url: 'https://api-hmugo-web.itheima.net/api/public/v1/categories',
        params: {}
    });
}

// 商品列表搜索
export const searchApi = (query) => {
    return http({
        method: 'GET',
        url: 'https://api-hmugo-web.itheima.net/api/public/v1/goods/search',
        params: { query }
    });
}

// 商品列表搜索
export const detailApi = (goods_id) => {
    return http({
        method: 'GET',
        url: 'https://api-hmugo-web.itheima.net/api/public/v1/goods/detail',
        params: { goods_id }
    });
}


